package server;

import dal.User;
import infrastructure.exceptions.LoginException;
import infrastructure.exceptions.operations.OperationException;

/**
 * This is the main facade of the server
 * @author sashas
 *
 */
public interface IServerFacade {
	
	/**
	 * Performs login to the server
	 * @param username  - user to logon
	 * @param password   - password to logon  
	 * @return interface of remote operations available for that user
	 * @throws LoginException - in case logon credentials were not recognized by the server
	 */
	public IServerSession logon(String username,String password) throws LoginException;
	
	
	/**
	 * @return logged in user of this session 
	 * @throws OperationException in case that the user is not logged in 
	 */
	public User getLoggedInUser() throws OperationException;
	
	/**
	 * performs logout from the server
	 */
	public void logout();
		
	
	
	
}
